package com.app.ctzoverseas.network.repo

import com.app.ctzoverseas.network.http.LoginNetwork
import com.cardetective.shopcar.network.model.BindMobilePost
import com.cardetective.shopcar.network.model.LoginPost

class LoginRepo(private val network: LoginNetwork) {

    fun postLogin(info: LoginPost) = network.postLogin(info)
    fun bindMobilePost(info: BindMobilePost) = network.bindMobile(info)

    companion object {

        @Volatile
        private var INSTANCE: LoginRepo? = null

        fun getInstance(netWork: LoginNetwork) =
            INSTANCE ?: synchronized(this) {
                INSTANCE ?: LoginRepo(netWork).also { INSTANCE = it }
            }
    }
}